Both SAS® Web Report Studio and SAS® Information Map Studio enable you to create calculated measures. In SAS Web Report Studio, when you add totals to a list or crosstabulation table that includes a calculated measure, the calculation that is used to derive the total for the calculated measure depends on the following:
As an example, consider the following table:
Year |
Actual |
Predict |
1997 |
Actual(1) |
Predict(1) |
1998 |
Actual(2) |
Predict(2) |
1999 |
Actual(3) |
Predict(3) |
If the default aggregation for the calculated measure is additive in the information map, then the result will
be consistent in all cases (list table and crosstabulation table, physical data and business data). The expression will be evaluated
before the aggregate function is applied. That is, the calculated
values will be evaluated before the total is applied and the total will
be calculated by adding the single calculated values.
Year |
Actual |
Predict |
Ratio=Actual/Predict |
1997 |
Actual(1) |
Predict(1) |
Actual(1)/Predict(1) |
1998 |
Actual(2) |
Predict(2) |
Actual(2)/Predict(2) |
1999 |
Actual(3) |
Predict(3) |
Actual(3)/Predict(3) |
Total |
Si[Actual(i)] |
Si[Predict(i)] |
Si[Actual(i)/Predict(i)] |
If the default aggregation for the calculated measure is non-additive in the information map, then you will see the following results.
In a list table, the total for the calculated measure will be missing regardless of whether the measure was defined by using business data or physical data.
Year |
Actual |
Predict |
Ratio=Actual/Predict |
1997 |
Actual(1) |
Predict(1) |
Actual(1)/Predict(1) |
1998 |
Actual(2) |
Predict(2) |
Actual(2)/Predict(2) |
1999 |
Actual(3) |
Predict(3) |
Actual(3)/Predict(3) |
Total |
Si[Actual(i)] |
Si[Predict(i)] |
Missing |
In a crosstabulation table, the total for the calculated measure does depend on whether the measure was defined by using business data or physical data.
If the
calculated measure is defined by using business data, then
the expression will be evaluated after the aggregate function is applied. In
other words, the calculated values will be evaluated after the total is applied and the calculated
value will be evaluated on the totals of the two columns.
Year |
Actual |
Predict |
Ratio=Actual/Predict |
1997 |
Actual(1) |
Predict(1) |
Actual(1)/Predict(1) |
1998 |
Actual(2) |
Predict(2) |
Actual(2)/Predict(2) |
1999 |
Actual(3) |
Predict(3) |
Actual(3)/Predict(3) |
Total |
Si[Actual(i)] |
Si[Predict(i)] |
Si[Actual(i)]/Si[Predict(i)] |
If the calculated measure is defined by using physical data, then you might get the error below:.
Error messages:There is a problem with the current page. Error Rendering the Report (Rendering Content) An invalid function was applied to the following DataItem - Ratio : InternalAggregation . . . Root Cause: com.sas.iquery.strategies.sas.oma.summaryrolap.ROLAPGenerationException: An invalid function was applied to the following DataItem - Ratio : InternalAggregation
If the measure was defined in SAS Web Report Studio, you will see the following results:
In a table list, the total for the calculated measure will be missing.
Year |
Actual |
Predict |
Ratio=Actual/Predict |
1997 |
Actual(1) |
Predict(1) |
Actual(1)/Predict(1) |
1998 |
Actual(2) |
Predict(2) |
Actual(2)/Predict(2) |
1999 |
Actual(3) |
Predict(3) |
Actual(3)/Predict(3) |
Total |
Si[Actual(i)] |
Si[Predict(i)] |
Missing |
In a crosstabulation table, the expression will be evaluated after the aggregate function is applied. In other words, the calculated values will be evaluated after the total is applied and the calculated value will be evaluated on the totals of the two columns.
Year |
Actual |
Predict |
Ratio=Actual/Predict |
1997 |
Actual(1) |
Predict(1) |
Actual(1)/Predict(1) |
1998 |
Actual(2) |
Predict(2) |
Actual(2)/Predict(2) |
1999 |
Actual(3) |
Predict(3) |
Actual(3)/Predict(3) |
Total |
Si[Actual(i)] |
Si[Predict(i)] |
Si[Actual(i)]/Si[Predict(i)] |
Product Family | Product | System | Product Release | SAS Release | ||
Reported | Fixed* | Reported | Fixed* | |||
SAS System | SAS Web Report Studio | Microsoft® Windows® for x64 | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 |
Microsoft Windows 2000 Advanced Server | 3.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows 2000 Datacenter Server | 3.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows 2000 Server | 3.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows 2000 Professional | 3.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows NT Workstation | 3.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows Server 2003 Datacenter Edition | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
Microsoft Windows Server 2003 Enterprise Edition | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
Microsoft Windows Server 2003 Standard Edition | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
Microsoft Windows XP Professional | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
Windows Vista | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
64-bit Enabled AIX | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
64-bit Enabled Solaris | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
HP-UX IPF | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
SAS System | SAS Web Report Viewer | Microsoft® Windows® for x64 | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 |
Microsoft Windows 2000 Advanced Server | 3.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows 2000 Datacenter Server | 3.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows 2000 Server | 3.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows 2000 Professional | 3.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows NT Workstation | 3.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows Server 2003 Datacenter Edition | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
Microsoft Windows Server 2003 Enterprise Edition | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
Microsoft Windows Server 2003 Standard Edition | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
Microsoft Windows XP Professional | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
Windows Vista | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
64-bit Enabled AIX | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
64-bit Enabled Solaris | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 | ||
HP-UX IPF | 3.1 | 4.2 | 9.1 TS1M3 SP4 | 9.2 TS2M0 |
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2008-04-08 11:52:41 |
Date Created: | 2008-03-13 03:52:32 |